home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / ed / data.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  3.0 KB  |  116 lines

  1. /*
  2. ** data.c
  3. **
  4. ** Ed, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include <stdio.h>
  9. #include <pictor.h>
  10. #include "ed.h"
  11.  
  12. char *copyright = "Ed, Version 1.51, Copyright (c) 1992-94 SoftCircuits\n"
  13.     "Redistributed by permission";
  14.  
  15. /* help topics */
  16. char hlp_general[] = "General Help";
  17. char hlp_new[] = "New";
  18. char hlp_open[] = "Open";
  19. char hlp_save[] = "Save";
  20. char hlp_saveas[] = "Save As";
  21. char hlp_print[] = "Print";
  22. char hlp_exit[] = "Exit";
  23. char hlp_find[] = "Find";
  24. char hlp_change[] = "Change";
  25. char hlp_repeatfind[] = "Repeat Last Find";
  26. char hlp_tabwidth[] = "Tab Width";
  27. char hlp_usinghlp[] = "Using Help";
  28. char hlp_index[] = "Help Index";
  29. char hlp_about[] = "About";
  30. char hlp_filemenu[] = "File Menu";
  31. char hlp_searchmenu[] = "Search Menu";
  32. char hlp_optionsmenu[] = "Options Menu";
  33. char hlp_helpmenu[] = "Help Menu";
  34.  
  35. int edit_color = foreback(WHITE,BLACK);
  36. int status_color = foreback(BLACK,WHITE);
  37.  
  38. COLORSTRUCT msgcolors = {
  39.     foreback(WHITE,BLACK),
  40.     foreback(BOLD|WHITE,BLACK),
  41.     foreback(BLACK,WHITE),
  42.     foreback(WHITE,BLACK),
  43. };
  44.  
  45. COLORSTRUCT mnucolors = {
  46.     foreback(BLACK,WHITE),
  47.     foreback(WHITE,BLACK),
  48.     foreback(WHITE,BLACK),
  49.     foreback(BLACK,WHITE)
  50. };
  51.  
  52. int edit_top = 2;
  53. int edit_bottom = 24;
  54. int edit_left = 1;
  55. int edit_right = 80;
  56. int modified = FALSE;
  57.  
  58. VIDEOSTRUCT vcfg;
  59. char filename[81];
  60.  
  61. /* menu data */
  62. SUBMENU filemenu[] = {
  63.     { "~New",
  64.         "Create a new file",hlp_new,filenew },
  65.     { "~Open",
  66.         "Open an existing file",hlp_open,fileopen },
  67.     { "~Save                 F2",
  68.         "Save the current file to disk",hlp_save,filesave },
  69.     { "Save ~As         Ctrl-F2",
  70.         "Save the current file with a different name",hlp_saveas,filesaveas },
  71.     SUBMENU_DIVIDER,
  72.     { "~Print                F9",
  73.         "Send the current file to the printer",hlp_print,fileprint },
  74.     SUBMENU_DIVIDER,
  75.     { "E~xit",
  76.         "Exit to DOS",hlp_exit,terminate },
  77.     END_SUBMENU
  78. };
  79.  
  80. SUBMENU searchmenu[] = {
  81.     { "~Find               F4",
  82.         "Search for text",hlp_find,search },
  83.     { "~Change",
  84.         "Search for text and replace it with other text",hlp_change,change },
  85.     { "~Repeat Last Find   F3",
  86.         "Find next occurance of last search",hlp_repeatfind,repeatsearch },
  87.     END_SUBMENU
  88. };
  89.  
  90. SUBMENU optionsmenu[] = {
  91.     { "~Tab Width",
  92.         "Set tab size",hlp_tabwidth,set_tabwidth },
  93.     END_SUBMENU
  94. };
  95.  
  96. SUBMENU helpmenu[] = {
  97.     { "~Help Using Help",
  98.         "View help on using the help system",hlp_usinghlp,using_help },
  99.     { "Help ~Index        Ctrl-F1",
  100.         "Select a help topic from the help index",hlp_index,help_index},
  101.     SUBMENU_DIVIDER,
  102.     { "~About",
  103.         "Display program version and copyright information",hlp_about,about},
  104.     END_SUBMENU
  105. };
  106.  
  107. MAINMENU mainmenu[] = {
  108.     { "~File",    "File operations menu",hlp_filemenu,filemenu },
  109.     { "~Search","Search operations menu",hlp_searchmenu,searchmenu },
  110.     { "~Options","Maintenance and miscellaneous operations menu",
  111.         hlp_optionsmenu,optionsmenu },
  112.     { "~Help",    "Help and program information operations menu",
  113.         hlp_helpmenu,helpmenu },
  114.     END_MAINMENU
  115. };
  116.